import { loginAPI, sendCodeAPI } from '@/api/login';
import { saveAuth } from '@/utils/storage';
export const sendCodeAction = (mobile: string) => {
  return async () => {
    await sendCodeAPI(mobile);
  };
};

export const loginAction = (mobile: string, code: string) => {
  return async () => {
    const res = await loginAPI(mobile, code);
    saveAuth(res.data);
  };
};
